package com.flower8.dao;

import com.flower8.model.HomeInsurer;
import com.flower8.model.HomeLoan;
import com.flower8.model.HomeWealth;
import com.flower8.utils.PageData;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: 保险精选dao接口
 * @Author: tanglin
 * @Date: 2020/3/27 16:04
 * @Version: 1.0
 */
@Repository
public interface HomeDao {
    /**
     * 保险精选列表
     * @param pd
     * @return
     * @throws Exception
     */
    List<HomeInsurer> getInsurerList(PageData pd)throws Exception;

    /**
     * 保险精选列表数量
     * @param pd
     * @return
     * @throws Exception
     */
    int getInsurerListCount(PageData pd)throws Exception;

    /**
     * 根据id查询
     * @param pd
     * @return
     * @throws Exception
     */
    HomeInsurer getInsurerById(PageData pd)throws Exception;

    /**
     * 更新保险精选接口
     * @param homeInsurer
     * @throws Exception
     */
    void updateInsurer(HomeInsurer homeInsurer)throws Exception;

    /**
     * 新增保险精选接口
     * @param homeInsurer
     * @throws Exception
     */
    void addInsurer(HomeInsurer homeInsurer)throws Exception;

    /**
     * 删除保险精选
     * @param id
     * @throws Exception
     */
    void deleteInsurer(long id)throws Exception;

    /**++++++++++++++++++++++++++++闪电贷款+++++++++++++++++++++++++++++**/
    /**
     * 闪电贷款列表
     * @param pd
     * @return
     * @throws Exception
     */
    List<HomeLoan> getLoanList(PageData pd)throws Exception;

    /**
     * 闪电贷款列表数量
     * @param pd
     * @return
     * @throws Exception
     */
    int getLoanListCount(PageData pd)throws Exception;

    /**
     * 根据id查询
     * @param pd
     * @return
     * @throws Exception
     */
    HomeLoan getLoanById(PageData pd)throws Exception;

    /**
     * 更新闪电贷款接口
     * @param homeLoan
     * @throws Exception
     */
    void updateLoan(HomeLoan homeLoan)throws Exception;

    /**
     * 新增闪电贷款接口
     * @param homeLoan
     * @throws Exception
     */
    void addLoan(HomeLoan homeLoan)throws Exception;

    /**
     * 删除闪电贷款
     * @param id
     * @throws Exception
     */
    void deleteLoan(long id)throws Exception;


    /**++++++++++++++++++++++++++++首页理财+++++++++++++++++++++++++++++**/
    /**
     * 首页理财列表
     * @param pd
     * @return
     * @throws Exception
     */
    List<HomeWealth> getWealthList(PageData pd)throws Exception;

    /**
     * 首页理财列表数量
     * @param pd
     * @return
     * @throws Exception
     */
    int getWealthListCount(PageData pd)throws Exception;

    /**
     * 根据id查询
     * @param pd
     * @return
     * @throws Exception
     */
    HomeWealth getWealthById(PageData pd)throws Exception;

    /**
     * 更新首页理财接口
     * @param homeWealth
     * @throws Exception
     */
    void updateWealth(HomeWealth homeWealth)throws Exception;

    /**
     * 新增首页理财接口
     * @param homeWealth
     * @throws Exception
     */
    void addWealth(HomeWealth homeWealth)throws Exception;

    /**
     * 删除首页理财
     * @param id
     * @throws Exception
     */
    void deleteWealth(long id)throws Exception;
}
